package Aquarium;

import java.util.ArrayList;

public class Muskie extends Fish
{
	public Muskie(String name, String type)
	{
		super(4);
		setName(name);
		setType(type);
		setEaten(false);
	}

	@Override
	public void encounter(Fish f, ArrayList<Fish> world)
	{
		
		if(f.getType().equals("goldfish")){
			world.remove(f);
			this.setEaten(true);
		}
		
		if(f.getType().equals("muskie")){
			for(int i = 0; i < this.getNumberOfPossibleChildren(); i ++){
				Muskie m = new Muskie("muskie", "muskie");
				m.setEaten(true);
				world.add(m);
			}

			f.setHasReproduced(true);
			this.setHasReproduced(true);
		}
		
		if(f.getType().equals("shark")){
			world.remove(this);
		}
	}


}
